package com.qf.bean;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class Item {

  private Long id;

  @NotBlank(message = "商品名称为必填项")
  private String name;

  @NotNull(message = "商品价格为必填项")
  private Double price;

  @DateTimeFormat(pattern = "yyyy-mm-dd")
  private Date productionDate;

  @NotBlank(message = "商品描述为必填项")
  private String description;

  @NotNull(message = "商品图片为必填项")
  private MultipartFile picFile;

  private String pic;
  private Date created;


}
